package com.ylml.demo.helloclient.controllers;

import com.ylml.demo.helloclient.services.HelloClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class ClientController {

    private final HelloClient client;

    @Autowired
    public ClientController(HelloClient client) {
        this.client = client;
    }

    @RequestMapping("/hello")
    public String hello() {
        return client.hello();
    }
}
